The '/etc/init.d/acme start' crontab migration
should also delete the existing
'/etc/init.d/acme start' line.
Otherwise, on every sysupgrade that carries
forward existing configurations, a new
'0 0 * * * /etc/init.d/acme renew' line is
added to the crontab.
Furthermore, do not add an 'acme renew' crontab
line if it already exists.
Signed-off-by: Satadru Pramanik, DO, MPH, MEng <[email protected]>
include $(TOPDIR)/rules.mk
PKG_NAME:=acme-common
-PKG_VERSION:=1.4.3
+PKG_VERSION:=1.4.4
PKG_LICENSE:=GPL-3.0-only
# Migrate '/etc/init.d/acme start' to '/etc/init.d/acme renew'
grep -q '/etc/init.d/acme start' /etc/crontabs/root 2>/dev/null && {
- echo "0 0 * * * /etc/init.d/acme renew" >>/etc/crontabs/root
+ grep -q '/etc/init.d/acme' /etc/crontabs/root 2>/dev/null || echo "0 0 * * * /etc/init.d/acme renew" >>/etc/crontabs/root
+ sed '/0 0 * * * \/etc\/init.d\/acme start/d' /etc/crontabs/root
}
exit 0